#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "appmanager.h"

class QSplitter;
class QGridLayout;
class ToolboxWidget;
class GraphicsScene;
class GraphicsView;
class PropertiesAndStyleWidget;
class StatuBar;
class CoordinateFrame;

class TriggerManager;


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
protected:
    // close event
    void closeEvent(QCloseEvent *);

    virtual void init();
    // create center widget
    virtual void createCenterLayout();
    // create connect
    virtual void createConnect();
    // clear scene and prop
    void clearSceneAndProp();
protected slots:
    // new
    void slotNew();
    // open
    void slotOpen();
    // save
    void slotSave();
    // save as
    void slotSaveAs();
    // views
    void slotSetWidgetPaneVisible(bool);
    void slotSetPropertyPaneVisible(bool);
    void slotSetPanesVisible();

    // redo
    void slotRedo();
    void slotUndo();

	void slotUpdateMousePos(QPointF);
	void slotSetSceneMode(SceneMode);
    // open element window
    void slotOpenElementWindow();
protected:
    QSplitter        *mHSplitter;
    ToolboxWidget    *mToolboxWgd;
    GraphicsScene    *mGraphicsScene;
    GraphicsView     *mGraphicsView;
    PropertiesAndStyleWidget *mPropWgd;
    StatuBar *mStatuBar;

    TriggerManager *mTriggerManager;
	bool mEnablePropVisible;

};

#endif // MAINWINDOW_H
